Go to Home Page
Questions?
Call 1-800-572-5517
 
  Go to Home Page  
  See all products
  See price schedules
  See manuals, tutorials, articles
  Download a free 30-day trial
  See user testimonials
  About Pacific Systems Group
 
 
SMF Tools
  See SMF Record Layouts
  See Sample SMF Reports
  Learn How to Export SMF Data
  Download Free SMF Reporting Software (30 days)
 
One of the greatest SMF record parsing programming languages I've ever seen. Chief, Large Systems Services Branch, NIH
  Choose Spectrum Writer to add 4GL to your product
  Report Writer Speedup Tips Article
Spectrum SMF Writer - the 4GL SMF Report Writer.

Add customized reports and PC export files to your product!

Table of Contents

NOTE: you can find this and other lessons in a
more complete and viewable format (including all Figures) in our Tutorial PDF.

Lesson 10. Customizing the Control Breaks

  1. This lesson introduces additional parms available to customize your control breaks. The control statement discussed is:
  2. the AVERAGE , MAXIMUM and MINIMUM statistical parms of the BREAK statement
  3. the HEADING and FOOTING parms of the BREAK statement
How to Print Statistics at a Control Break
  1. You may want to print other statistics in addition to totals at a control break. The total line, as we have seen, prints automatically at control breaks. By supplying the appropriate parm in the BREAK statement, you can also print up to five additional statistical lines at a control break. These parms are listed in the following table:
    1. Parm
    1. Description
    1. AVERAGE ( AVG )
    1. Average value (mean)
    1. NZAVERAGE ( NZAVG )
    1. Average of only the non-zero values
    1. MAXIMUM ( MAX )
    1. Maximum value
    1. MINIMUM ( MIN )
    1. Minimum value
    1. NZMINIMUM ( NZMIN )
    1. Non-zero minimum value
  2. You can specify as many of these parms as you like in the BREAK statement. The parms may be specified in any order. (The statistic lines in the report, however, always print in a standard fixed order.) For example:

BREAK: SMF14-JOBID AVERAGE MAXIMUM

  1. The BREAK statement above requests that an average line and a maximum line print (in addition to the totals line) whenever the contents of the SMF14-JOBID field changes.
  2. The report in Figure _ uses the above statement.
  3. Printing statistics and custom headings and footings at control breaks
    Printing statistics and custom headings and footings at control breaks
     
Customized Break Heading and Footing Lines
  1. In addition to the totals line (and other statistics lines) discussed above, you can also print your own custom lines at the beginning or end of a control group. The parms (in the BREAK statement) to do this are:
  2. the HEADING parm
  3. the FOOTING parm
  4. You can specify any number of these parms. Each parm results in one line that will be printed at the beginning or end of the control group. Within these parms, specify a "print expression." Print expressions are combinations of literal text and field names, of the sort that we have used earlier in the COLUMNS statement and the TITLE statement.
  5. One powerful feature of the FOOTING parm is that you can print a statistical value (total, average, maximum, etc.) of a field, rather than just the value of that field from the last record in the control group. You can do that by specifying one of the statistical parms in parentheses after the field name:

BREAK: SMF14-JOBID FOOTING('MAXIMUM EXCP COUNT WAS' SMF14EXCP(MAX))

  1. The report in Figure _ shows examples of some of these additional features. Notice that by moving the long SMF14-JOBID field out of the COLUMNS statement and into a break heading line, we opened up much more room for data in the actual report lines. That is one good way to use break headings.
  2. For a much more detailed discussion of customizing control breaks with these features, see
Using Break Headings for Hierarchical Report Layouts
  1. Here is another example of using custom headings to produce a complex report. In fact, the result is so sophisticated that most people would not guess that it came from just a few lines of 4GL report writer code.
  2. This sample report uses just the type 70 subtype 1 SMF records (RMF Processor Activity). These records have a complex layout. Each record contains a variable number of "LPAR sections," one for each logical partition in the system. Furthermore, there are a variable number of "logical processor sections" for each of those LPAR sections. However, all of these logical processor sections are grouped together near the end of the SMF record -- not physically within each owning LPAR section.
  3. This report features nested normalization and customized break headings
    This report features nested normalization and customized break headings
     
    This report features nested normalization of SMF sections and customized break headings
    This report features nested normalization of SMF sections and customized break headings
     
  4. Nevertheless, Spectrum SMF Writer easily handles these records so you quickly create powerful reports from your RMF data. We use nested NORMALIZE parms on the INPUT statement to process each logical processor that exists for each logical partition. (The NORMALIZE parm was discussed earlier in "How to Report on Multiple Occurrences of a Section".)
  5. The report is sorted by LPAR name and then by logical processor address.
  6. The report is formatted to reflect the hierarchical layout of the SMF 70 records. We used the page titles to show information about the physical CPU, since it is applies to all of the LPARs.
  7. Then, for each of the LPARs, we print a header section containing ID information, as well as capacity and MSU values.
  8. Following that are the report lines for each of the logical processors for that LPAR. On each processor line we show the percentage of the RMF reporting interval for which that processor was: 1) online, 2) waiting, 3) effectively dispatched and 4) processor dispatched. Note that the percentage fields used are not actually in the RMF record itself. They are computed fields. However, they are included in the copy library along with the actual RMF record definitions. That means that you can use the percent fields just like any other RMF field.
Summary
  1. Here is a summary of what we learned in this lesson:
  2. use one or more statistical parms to request that statistical lines print at a control break
  3. use HEADING and FOOTING parms in your BREAK statement to completely customize the lines printed around your control groups
  4. the custom lines that you print at control breaks can contain a statistical value of a field (such as total, average, maximum, etc.)
To Learn More
  1. You can also learn:
  2. how to suppress the total line at a control break
  3. how to compute percentages and ratios that apply to an entire control group
  4. how to customize the Grand Totals at the end of the report
  5. the complete syntax for the BREAK statement, in
  6.  
  7.  
That was the final lesson.
Back to the Table of Contents

Spectrum SMF Writer - the 4GL SMF Report Writer.

Copyright 2024.
Pacific Systems Group.
All rights reserved.
Home | Products | Prices | Documentation | 30-Day Trials | Customer Reviews | Company | FAQ | Sample Reports | SMF Records
Send Your Comments or Questions